<?php 
include_once("../../../configuracion/config.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/plantillaAdmin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rol de un Partner en un Grupo</title>
<!-- InstanceEndEditable -->
<link rel="stylesheet" type="text/css" href="../../css/estilo.css"/>
<link rel="stylesheet" type="text/css" href="../../css/DatePicker.css"/>
<link rel="stylesheet" type="text/css" href="../../css/sortableTable.css"/>
<link rel="SHORTCUT ICON" href="../../../logo/unc.ico"/>
<!-- InstanceBeginEditable name="head" -->
<script type="text/javascript" src="../../js/mootools.js"></script>
<script type="text/javascript" src="../../js/DatePicker.js"></script>
<script type="text/javascript" src="../../js/fValidator-full.js"></script>
<script type="text/javascript" src="../../js/sortableTable.js"></script>
<script type="text/javascript" src="../../js/form_abm.js"></script>
<script type="text/javascript" src="../../js/fValidator-full.js"></script>

<script>



function funcionFila(){
	 fila = this.id;
	 var miJSON = new Json.Remote("ajax.form/rol_datos.php",	{
	//la peticion nos devolvera un objeto el cual llegara como parametro en el evento onComplete
	onComplete: function(objevento){
		$('idrol').value = objevento.idrol;
		      $('descripcion').value = objevento.descripcion;
		      $('eliminar').disabled = false;
		       $('actualizar').disabled = false;
		      $('idevento').value=objevento.idevento;
		      }
	});	
       miJSON.send(fila);
}

	 var myTable = {};
window.addEvent('domready', function(){
	myTable = new sortableTable('myTable', 
								{overCls: 'over', 
								 onClick: funcionFila
								});

	myForm = new form_abm('frol',
							 {accion:'ajax.form/rol_add.php',nombre:'guardar',capa:'log_res_ajax'} ,
							 {accion: 'ajax.form/rol_del.php',nombre:'eliminar',capa:'log_res_ajax'},
							 {accion:'ajax.form/rol_act.php',nombre:'actualizar',capa:'log_res_ajax'},
							 ['descripcion'],myTable )

}); 
</script>
<!-- InstanceEndEditable -->

</head>

<body>

<?php include('../estructura/encabezado.php');?>
<div class="menuIzqquierdo">

<?php include('../menu/menuIzq.html');?>

</div>
<div class="content"><!-- InstanceBeginEditable name="EditRegion3" -->
<div id="ajax_bar">
<h2>Rol </h2>
	<form id="frol" name="frol" method="post" >
	<?php include_once("int_rol.php"); ?>
	 <input id="guardar" class="fValidator-form" type="button"  value="Nuevo rol" name="guardar"/>	
     <input id="actualizar" class="fValidator-form" type="button"   value="Actualizar rol" name="actualizar" disabled="disabled"/>	
      <input id="eliminar" class="fValidator-form" type="button"    value="Eliminar rol" name="eliminar" disabled="disabled"/>	

	 </form>
</div>
<div id="info">

		<div id="log_res_ajax"><!-- spanner --></div>
		
		<?php include_once('rol_list.php');?>
</div>
<!-- InstanceEndEditable --></div>

<?php include('../estructura/pie.php');?>
</body>
<!-- InstanceEnd --></html>
 